package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdminPrizeRecordMapper;
import com.ruoyi.system.domain.AdminPrizeRecord;
import com.ruoyi.system.service.IAdminPrizeRecordService;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 开奖记录Service业务层处理
 *
 * @author ruoyi
 * @date 2020-09-22
 */
@Service
public class AdminPrizeRecordServiceImpl implements IAdminPrizeRecordService
{
    @Autowired
    private AdminPrizeRecordMapper adminPrizeRecordMapper;

    /**
     * 查询开奖记录
     *
     * @param recordId 开奖记录ID
     * @return 开奖记录
     */
    @Override
    public AdminPrizeRecord selectAdminPrizeRecordById(Long recordId)
    {
        return adminPrizeRecordMapper.selectAdminPrizeRecordById(recordId);
    }

    /**
     * 查询开奖记录列表
     *
     * @param adminPrizeRecord 开奖记录
     * @return 开奖记录
     */
    @Override
    public List<AdminPrizeRecord> selectAdminPrizeRecordList(AdminPrizeRecord adminPrizeRecord)
    {
        return adminPrizeRecordMapper.selectAdminPrizeRecordList(adminPrizeRecord);
    }

    @Override
    public List<AdminPrizeRecord> selectAdminPrizeRecordListTwo(AdminPrizeRecord adminPrizeRecord) {
        return adminPrizeRecordMapper.selectAdminPrizeRecordListTwo(adminPrizeRecord);
    }

    @Override
    public List<AdminPrizeRecord> selectAdminPrizeRecordListToAgent(AdminPrizeRecord adminPrizeRecord) {
        return adminPrizeRecordMapper.selectAdminPrizeRecordListToAgent(adminPrizeRecord);
    }

    @Override
    public List<AdminPrizeRecord> selectAdminPrizeRecordListToAgentFifty(AdminPrizeRecord adminPrizeRecord) {
        return adminPrizeRecordMapper.selectAdminPrizeRecordListToAgentFifty(adminPrizeRecord);
    }

    @Override
    public Map<String, Object> selectAdminPrizeRecordCount() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordCount();
    }

    @Override
    public List<AdminPrizeRecord> selectAdminPrizeRecordLimit() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordLimit();
    }

    @Override
    public AdminPrizeRecord selectAdminPrizeRecordByPrizeTime() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordByPrizeTime();
    }

    @Override
    public AdminPrizeRecord selectAdminPrizeRecordByPrizeTimeForMax() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordByPrizeTimeForMax();
    }

    @Override
    public int updatePrizeState() {
        return adminPrizeRecordMapper.updatePrizeState();
    }

    @Override
    public AdminPrizeRecord selectAdminPrizeRecordByNewTime() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordByNewTime();
    }

    @Override
    public List<AdminPrizeRecord> getPrizeList(@PathVariable("searchTime") String searchTime) {
        return adminPrizeRecordMapper.getPrizeList(searchTime);
    }

    @Override
    public AdminPrizeRecord selectAdminPrizeRecordByMaxPeriod() {
        return adminPrizeRecordMapper.selectAdminPrizeRecordByMaxPeriod();
    }

    @Override
    public AdminPrizeRecord getCurrentPrizeInfo() {
        return adminPrizeRecordMapper.getCurrentPrizeInfo();
    }

    @Override
    public AdminPrizeRecord getMinPrizeInfoByPeriod() {
        return adminPrizeRecordMapper.getMinPrizeInfoByPeriod();
    }

    @Override
    public AdminPrizeRecord getNextPrizeInfo() {
        return null;
    }

    /**
     * 新增开奖记录
     *
     * @param adminPrizeRecord 开奖记录
     * @return 结果
     */
    @Override
    public int insertAdminPrizeRecord(AdminPrizeRecord adminPrizeRecord)
    {
        adminPrizeRecord.setCreateTime(DateUtils.getNowDate());
        return adminPrizeRecordMapper.insertAdminPrizeRecord(adminPrizeRecord);
    }

    /**
     * 修改开奖记录
     *
     * @param adminPrizeRecord 开奖记录
     * @return 结果
     */
    @Override
    public int updateAdminPrizeRecord(AdminPrizeRecord adminPrizeRecord)
    {
        adminPrizeRecord.setUpdateTime(DateUtils.getNowDate());
        return adminPrizeRecordMapper.updateAdminPrizeRecord(adminPrizeRecord);
    }

    /**
     * 批量删除开奖记录
     *
     * @param recordIds 需要删除的开奖记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminPrizeRecordByIds(Long[] recordIds)
    {
        return adminPrizeRecordMapper.deleteAdminPrizeRecordByIds(recordIds);
    }

    /**
     * 删除开奖记录信息
     *
     * @param recordId 开奖记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminPrizeRecordById(Long recordId)
    {
        return adminPrizeRecordMapper.deleteAdminPrizeRecordById(recordId);
    }
}
